$OpenBSD: patch-mkspecs_openbsd-g++_qmake_conf,v 1.1.1.1 2016/12/25 14:13:11 zhuk Exp $
1. Un-hardcode system paths.
2. Make sure some paths are listed before others, needed to 
   make sure egcc won't pick up /usr/include before its own 
   directories.
3. Respect OpenBSD shared library naming rules.
4. Use common GCC options to avoid duplication.
5. Allow C++11 to work.
--- mkspecs/openbsd-g++/qmake.conf.orig	Fri Sep 16 08:49:42 2016
+++ mkspecs/openbsd-g++/qmake.conf	Sat Dec 17 14:16:53 2016
@@ -5,23 +5,31 @@
 MAKEFILE_GENERATOR      = UNIX
 QMAKE_PLATFORM          = openbsd
 
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
 include(../common/bsd/bsd.conf)
 
 # Addon software goes into /usr/local on OpenBSD, by default we will look there
-QMAKE_INCDIR            = /usr/local/include
-QMAKE_LIBDIR            = /usr/local/lib
+LOCALBASE               = $$(LOCALBASE)
+isEmpty(LOCALBASE) {
+  LOCALBASE             = /usr/local
+}
+QMAKE_INCDIR_PREPEND    = ${OPENBSD_INCDIR_PREPEND}
+QMAKE_INCDIR            = $$LOCALBASE/include
+QMAKE_LIBDIR            = $$LOCALBASE/lib
 
 # System provided X11 defaults to X11R6 path on OpenBSD
-QMAKE_INCDIR_X11        = /usr/X11R6/include
-QMAKE_LIBDIR_X11        = /usr/X11R6/lib
-QMAKE_INCDIR_OPENGL     = /usr/X11R6/include
-QMAKE_LIBDIR_OPENGL     = /usr/X11R6/lib
+X11BASE                 = $$(X11BASE)
+isEmpty(X11BASE) {
+  X11BASE               = /usr/X11R6
+}
+QMAKE_INCDIR_X11        = $$X11BASE/include
+QMAKE_LIBDIR_X11        = $$X11BASE/lib
+QMAKE_INCDIR_OPENGL     = $$X11BASE/include
+QMAKE_LIBDIR_OPENGL     = $$X11BASE/lib
 
 QMAKE_RPATHDIR         += $$QMAKE_LIBDIR_X11
 
-include(../common/gcc-base-unix.conf)
-include(../common/g++-unix.conf)
-
 # System compiler is gcc 4.2.1 up to OpenBSD 6.0.
 # For proper C++11 support, we need to use a newer gcc from ports/packages,
 # where compiler commands are renamed to egcc/eg++. Therefore, redefine
@@ -36,8 +44,11 @@ QMAKE_CXX               = eg++
 QMAKE_LINK              = $$QMAKE_CXX
 QMAKE_LINK_SHLIB        = $$QMAKE_CXX
 
+QMAKE_OPENBSD_SHLIB	= 1
 
 # Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ
 QMAKE_LFLAGS_NOUNDEF    =
+QMAKE_LFLAGS_SONAME	=
+QMAKE_LFLAGS_NEW_DTAGS  =
 
 load(qt_config)
